<template>
  <div class="mymoney">123
    <div class="mymoney-outer">
      <input v-model="qfwTxt" @blur="onblur" @focus="onfocus"/>
      <input v-model="bigTxt" readonly/>
    </div>
  </div>
</template>

<script>
module.exports = {
  props: ['decimal_point'],//接收父组件传的值
  data() {
    return {
      qfwTxt: '',
      bigTxt: ''
    }
  },
  methods: {
    onblur() {
      this.bigTxt = `${this.qfwTxt}元`;
      //把值传给父组件
      this.$emit('input', this.qfwTxt)
    },
    onfocus() {
      //具体操作
    }
  },
  created() {
    //初始化赋值
    if (this.$attrs.value) {
      this.qfwTxt = this.$attrs.value;
      this.bigTxt = `${this.$attrs.value}元`;
    }
  }
}
</script>
<style scoped>
.mymoney {
  background: white;
}

.mymoney-outer {
  margin: 0;
  padding: 0;
  border: 1px solid #000000;
}

</style>